<?php

/**
 * 收藏夹
 */

namespace app\shop\common;

class FollowCommon extends \app\member\common\MemberCommon {

    protected function index() {
        $this->setMeta('商品收藏');
        $this->pageInfo['name'] = '商品收藏';

        $urlParam = [];
        $where = [];
        $pageLimit = 10;
        $where['user_id'] = $this->userInfo['user_id'];
        $model = target('shop/ShopFollow');
        $count = $model->countList($where);
        $pageData = $this->pageData($count, $pageLimit, $urlParam);
        $list = $model->loadList($where, $pageData['limit'], 'follow_id desc');

        $this->assign('page', $pageData['html']);
        $this->assign('pageList', $list);
        $this->assign('pageParams', $urlParam);
        $this->memberDisplay();
    }

}